<h1 class="page-header">
    <small>店铺管理</small>
</h1>
<hr/>
<div class="panel panel-inverse" data-sortable-id="form-stuff-5">
    <div class="panel-heading">
        <h4 class="panel-title">店铺查询</h4>
    </div>
    <div class="panel-body">
        <form id="storeForm" name="storeForm" method="post" class="form-inline">
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="LIKE_name" value="${params.LIKE_name}"
                       placeholder="店铺名称">
            </div>
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="EQ_id" value="${params.EQ_id}"
                       placeholder="店铺编号">
            </div>
            <div class="form-group m-r-10">
                <select class="form-control" name="EQ_status" id="EQ_status">
                    <option value="">状态</option>
                     <option value="A" <#if params.EQ_status== "A"> selected</#if>>激活</option>
                     <option value="D" <#if params.EQ_status== "D"> selected</#if>>禁用</option>
                </select>
            </div>
            <button type="button" class="btn btn-sm btn-success m-r-5"
                    onclick="postDataByForm('backend/store/queryList','displayArea','storeForm')"><i class="fa fa-search"></i>查 询
            </button>
            <button type="button" class="btn btn-sm btn-danger m-r-5"
               onclick="getData('${rc.contextPath}/backend/store/add','displayArea')"><i class="fa fa-plus"></i>新增店铺</button>
        </form>
    </div>
</div>
<hr/>
<div class="panel panel-inverse" data-sortable-id="table-basic-4">
    <div class="panel-heading">
        <h4 class="panel-title">店铺信息列表</h4>
    </div>
    <div class="panel-body">
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th>店铺ID</th>
                <th>店铺名称</th>
                <th>联系人</th>
                <th>联系电话</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <#if paginationResponse?has_content && paginationResponse.content?exists && paginationResponse.content?size gt 0>
                <#list paginationResponse.content as ct>
                    <tr>
                        <td>${ct.id}</td>
                        <td>${ct.name}</td>
                        <td>${ct.contact}</td>
                        <td>${ct.phone}</td>
                        <td> <#if ct.status == "A">已激活
                            <#else>已禁用
                           </#if>
                        </td>
                        <td>${ct.createTime}</td>
                        <td>
                            <#if ct.status == "A">
                            <a class="label label-danger small-btn" href="javascript:getConfirmData('确定禁用该店铺吗?','${rc.contextPath}/backend/store/delete/${ct.id}','displayArea')"><i class="fa fa-lock"></i>禁用</a>
                            <#else>
                            <a class="label label-success small-btn" href="javascript:getConfirmData('确定激活该店铺吗?','${rc.contextPath}/backend/store/active/${ct.id}','displayArea')"><i class="fa fa-eye"></i>生效</a>
                            </#if>
                            <a class="label label-success small-btn" href="javascript:getData('${rc.contextPath}/backend/store/storeEditInit/${ct.id}','displayArea')"><i class="fa fa-edit"></i>编辑</a>
                        </td>
                    </tr>
                </#list>
            <#else>
            <tr class="gradeA even" role="row">
                <td colspan="12" class="text-center">没有符合条件的数据！</td>
            </tr>
            </#if>
        </table>
    </div>
</div>

<!-- 分页组件 -->
<!-- recordBean 分页查询结果Bean
     action 分页请求URL
     formName 分页需要的查询参数的表单名称 -->
<@sp.pagination recordBean=paginationResponse action="${rc.contextPath}/backend/store/queryList" formName="storeForm"/>